module.exports = async (path, method = "POST", data) => {
  const token = await wx.getStorageSync('token')
  // const res = await wx.cloud.callContainer({
  //   config: {
  //     env: 'prod-4gnshh372cb1b689'
  //   },
  //   path,
  //   method,
  //   header: {
  //     "X-WX-SERVICE": "express-qzhd",
  //     "content-type": "application/json",
  //     "token":token
  //   },
  //   data,
  // })
  console.log(path)
  return new Promise((resolve, reject) => {
    wx.request({
      header:{
        'token':token,
        "content-type": "application/json",
      },
      url: path,
      method:method,
      data:data,
      success:res=>{
        resolve(res)
      },
      fail:error=>{
        reject(error)
      }
    })
  })
}